﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using xiushen.Domain;
using xiushen.Infrastructure;

namespace xiushen.Models
{
    public class VideoModel
    {
        
        public string NextPage { get; set; }
        public string PrevPage { get; set; }
        public string Source { get; set; }
        public string VideoUrl { get; set; }
    }
    public class BookQueryResult
    {
        public IEnumerable<Book> Books { get; set; }
        public IEnumerable<Attachment> PdfBooks { get; set; }
    }

    public class CatalogModel
    {
        public Category CategoryData { get; set; }
        public IEnumerable<SelectListItem> Categorys { get; set; }

    }
    public class UPdateBookBomdel
    {
        public Book BookData { get; set; }
        public IEnumerable<SelectListItem> Categorys { get; set; }
        // Reference to the uploaded file
    }

    public class UploadFileModle
    {
        public Attachment AttachmentData { get; set; }
        public IEnumerable<SelectListItem> Categorys { get; set; }
        public HttpPostedFileBase Picture { get; set; }

    }

    public class BookViewModel
    {
        public int TotalBook { get; set; }
        public IEnumerable<Category> RootCategories { get; set; }
        public IEnumerable<Category> AllCategorys { get; set; } 
        public Category Category { get; set; }
        public int PageCount { get { return TotalBook/ Constants.PAGESIZE + 1; } }
        public int PageIndex { get; set; }
    }
    public class MoreViewModel
    {
        public int TotalBook { get; set; }
        public Category Category { get; set; }
        public int PageCount { get { return TotalBook / Constants.PAGESIZE + 1; } }
        public int PageIndex { get; set; }
    }
}